<!-- Generated automatically from an XML file of the same name.
     Copyright: Stephen J. Sangwine and Nicolas Le Bihan, 2008-2010.
--><html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>sqrt :: Functions (Quaternion Toolbox Function Reference)
</title><link rel="stylesheet" href="qtfmstyle.css" type="text/css"></head><body><h1>Quaternion Function Reference</h1><h2>sqrt</h2>
<p>Square root<br>(Quaternion overloading of standard MATLAB&reg; function)
</p>
<h2>Syntax</h2><p><tt>Y = sqrt(X)</tt></p>
<h2>Description</h2>
<p>
<tt>sqrt(X)</tt> computes the square root of each element of the
quaternion array <tt>X</tt>.
</p>
<p>
The quaternion square root is easily defined in terms of the polar form:
<i>q</i> = |<i>q</i>|exp(&#956;&#952;). Then &#8730;<i>q</i>
= &#8730;|<i>q</i>|exp(&#956;&#952;/2).
</p>

<h2>Examples</h2>
<pre>
&gt;&gt; sqrt(qi)
 
ans = 0.7071 + 0.7071 * I + 0 * J + 0 * K
 
&gt;&gt; ans.^2
 
ans = 0 + 1 * I + 0 * J + 0 * K
</pre>

<h2>See Also</h2>MATLAB&reg; function: <a href="matlab:doc sqrt">sqrt</a><br>
<h4>&copy; 2008-2010 Stephen J. Sangwine and Nicolas Le Bihan</h4><p><a href="license.html">License terms.</a></p></body></html>